1. Field of the Invention
The present invention relates to a method of controlling a flash memory, especially a method of controlling a flash memory useful for rewriting of small-scale data used in a cellular phone, etc.
2. Description of the Related Art
Conventionally, in the field of flash memories, a minimum unit erased by 1 flash is referred to a sector and a flash memory has been controlled by the sector as a unit. However, when the size of data processed is as small as that of small-scale data containing a few bites or so such as an IP address, a MAC (Machine Address Code) address, the size of 1 sector has been an issue from the viewpoint of the efficiency of controlling memories in the application where such small-scale data are frequently accessed.
FIG. 1A is a diagram showing an example of the constitution of a conventional flash memory using the sector as the unit and it is configured that a file is divided into sectors 701, and a sector control region 702 is provided at the head of each sector, and the number of erasure-times and the information about a party linked to the sector are written in the control region. With regard to such a control method, for example, in JP, 2002-7221, A described is that a sector is divided further into smaller blocks and a writing decision region, representing whether the block concerned is already written thereon or not, is provided for each block at its head, and in JP, 2001-312891, A described is that a memory is divided into blocks and a control status writing area is provided for each memory block, and in JP, 08-273390, A described is that a block storage area for the data of the number of erasure times is provided for each block at its head.
FIG. 1B shows a method of controlling a memory described in JP, 2000-76117, A and each sector is composed of a plurality of small blocks 703, and each small block comprising 256 bytes is composed of a control region 704 with 6 bytes and a data storage region with 250 bytes. The control region 704 in this case comprises a file number 706, a sector number 707 of the following storage portion, a small block address 708 showing the linkage to other small blocks, and an available/unavailable code 709 representing whether the data of the small block are available or unavailable.
However, by means of the conventional methods above, when small-scale data are frequently rewritten in such an application as to enclose a small-scale data like an IP address of the Internet in a flash memory inside a cellular phone, working efficiency of the memory may not have been said to be sufficient.